<template>
  <div class="Collections">
    <van-nav-bar title="我的收藏" left-text="返回" left-arrow @click-left="$router.back()"  >
    </van-nav-bar>
    <van-list v-model="loading" :finished="finished" finished-text="没有更多了" @load="onLoad">

      <van-swipe-cell :right-width="2.00*rootValue"  v-for="item in list"
                      :key="item"
                      :title="item">
        <van-cell-group>
          <van-cell title="《说虾》 - 白石" value="2019-05-02" label="说起虾，就想到齐白石先生的虾"/>
        </van-cell-group>
        <div slot="right">
          <van-button type="danger" class="swipe_right" square>删除</van-button>
        </div>

      </van-swipe-cell>
    </van-list>
  </div>
</template>
<script>
    // @ is an alias to /src

    export default {
      mounted(){
        this.rootValue=document.getElementsByTagName("html")[0].style.fontSize.replace("px","");
        console.log(this.rootValue)
      },
        data()
        {

            return {
              rootValue:0,
              scale:0,
              list: [],
              loading: false,
              finished: false,
              active:0,
              showMenu:false
            };
        },
      methods: {
        onMenu(){
          this.showMenu=true
        },
        onLoad() {
          // 异步更新数据
          setTimeout(() => {
            for (let i = 0; i < 10; i++) {
              this.list.push(this.list.length + 1);
            }
            // 加载状态结束
            this.loading = false;

            // 数据全部加载完成
            if (this.list.length >= 40) {
              this.finished = true;
            }
          }, 500);
        }
      },
        name: 'Collections',
        components: {
        }
    }
</script>
<style lang="scss">
.editPaper{
  .van-col{
    border: 2px solid #eeeeee;
    height: 125px;background-color: #8d8e90;
  }
}

</style>

